package top.archiesean.admin.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import top.archiesean.admin.dto.UserInfo;
import top.archiesean.common.core.constant.ServiceNameConstants;
import top.archiesean.common.core.domain.R;

/**
 * @author ArchieSean
 * @description 用户相关接口
 * @date 2024-01-23 17:57
 */
@FeignClient(contextId = "userFeign", name = ServiceNameConstants.ADMIN_SERVICE)
public interface UserFeign {
    /**
     * 根据用户名称获取用户信息
     *
     * @param username 用户名称
     * @return obj
     */
    @GetMapping("/user/{username}")
    R<UserInfo> loadByUsername(@PathVariable("username") String username);
}
